package com.xianggu.threadPool.rejectStrategy;

import com.xianggu.threadPool.MyThreadPool;

/**
 * @author chengjy
 * @date 2025/3/14
 */
public class DefalutRejectHandle implements RejectHandle {
    @Override
    public void reject(MyThreadPool myThreadPool, Runnable runnable) {
        // 由当前主线程执行！
        System.out.println("当前任务被拒绝，由主线程执行！" + Thread.currentThread().getName());
        runnable.run();
    }
}
